package cn.iocoder.yudao.module.locale.controller.app.tabledata.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Schema(description = "用户 APP - 表数据国际化条件查询 Request VO")
@Data
public class TableDataConditionReqVO {
    @Schema(description = "语言", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "language不能为空")
    private String language;

    @Schema(description = "表的条件", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "tableConditionList不能为空")
    @Valid
    private List<TableCondition> tableConditionList;

    @Schema(description = "表的条件")
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TableCondition {
        @Schema(description = "表名", requiredMode = Schema.RequiredMode.REQUIRED)
        @NotEmpty(message = "tableName不能为空")
        private String tableName;

        @Schema(description = "行Id", requiredMode = Schema.RequiredMode.REQUIRED)
        @NotEmpty(message = "rowIds不能为空")
        private List<String> rowIds;

    }

}